<template>
  <div id="app">
   <h @add='add'/>
   <list :list1='list1' @del='del'/>
  </div>
</template>


<script>
import h from './components/head.vue'
import list from './components/list.vue'
export default {
  components:{h,list},
  data(){
    return{
      list1:[]
    }
  },
  methods:{
    add(obj){
      this.list1.push(obj)
    },
    del(key){
      this.list1.splice(key,1)
    }
  }
}
</script>

<style>
  ul{
    list-style: none;
  }
</style>
